const  Koa=require('koa');
const  Router=require('koa-router');
const app=new Koa();
const router=new Router();
const koaBody=require('koa-body');
app.use(koaBody());
//登陆
router.post("/user/login",ctx=>{
   const loginName=ctx.request.body.loginName;
   const pwd=ctx.request.body.pwd;
   ctx.body=JSON.stringify(ctx.request.body);
});
app
  .use(router.routes())
  .use(router.allowedMethods());
  app.listen(3000);